#include<stdio.h>

int main()
{
	/*
	int i = 0;
	do
	{
		if(5 == i)
			continue;
		
		printf("%d",i);
		i++;
		//输出1 2 3 4后,死循环
	}while(i<10);
	
	return 0;
	*/
	
	//练习：计算n的阶乘
	
	//1.我自己构思写的代码：
	/*
	int i = 1;
	int n = 0;
	printf("请输入一个整数：");  //输入n
	scanf("%d",&n);
	int a = n;  //a逐级递减，用作阶乘公式计算
	int b = n;  //b保持n的值，用作for循环判断
	
	for(i = 1;i <= b;i++)
	{
		if(a != 1)
		{
			a = a - 1;
			n = n * a;
		}
	}
	printf("该数的阶乘为：%d\n",n);  //输出结果
	*/
	
	//2.教学视频举例的更简洁高效的代码:
	int i = 1;
	int n = 0;
	int ret = 1;
	
	scanf("%d",&n);
	for(i = 1;i <= n;i++)
	{
		ret = ret * i;
	}
	printf("%d\n",ret);
	 
}




